package com.victor.zjbj_android.yinhuan;

import android.content.Context;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;


import java.util.List;

/**
 * Created by liuwei on 2017/8/5.
 * version 1.0
 */

public class MyYinHuanPagerAdapter extends FragmentPagerAdapter {
    private String[] mTitles;
    private List<Fragment> mFramgents;

    private  Context context;
    public MyYinHuanPagerAdapter(FragmentManager fm, List<Fragment> mFragments, String[] strings) {
        super(fm);
        this.mFramgents = mFragments;
        this.mTitles = strings;
        this.context=context;
    }

    @Override
    public Fragment getItem(int position) {
        return mFramgents.get(position);
    }

    @Override
    public int getCount() {
        return mFramgents.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return mTitles[position];
    }

}